<?php

namespace App\Admin\Controllers;

use App\Admin\Forms\Activity;
use App\Http\Controllers\Controller;
use Encore\Admin\Layout\Content;

class ActivityController extends Controller
{
    public function index(Content $content)
    {
        $content
            ->title('活动查询')
            ->body(new Activity());
        // 如果有从后端返回的数据，那么从session中取出，显示在表单下面
        if ($result = session('result')) {
            $content->row('<pre>' . $result . '</pre>');
        }
        return $content;
    }
}
